gdk: define GdkRectangle structure for introspection scanning
authorLionel Landwerlin <llandwerlin@gmail.com>
Sun, 3 May 2015 10:38:45 +0000 (11:38 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 8 May 2015 10:47:51 +0000 (11:47 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=748833

gdk/gdktypes.h

index 64e7243214ffd7ed13ae3c0f4c97d71588b1edfb..6ff71a7b3f5714644ff9a7235c2148219d301d29 100644 (file)
@@ -75,7 +75,23 @@ typedef struct _GdkPoint              GdkPoint;
  * Defines the position and size of a rectangle. It is identical to
  * #cairo_rectangle_int_t.
  */
+#ifdef __GI_SCANNER__
+/* The introspection scanner is currently unable to lookup how
+ * cairo_rectangle_int_t is actually defined. This prevents
+ * introspection data for the GdkRectangle type to include fields
+ * descriptions. To workaround this issue, we define it with the same
+ * content as cairo_rectangle_int_t, but only under the introspection
+ * define.
+ */
+struct _GdkRectangle
+{
+    int x, y;
+    int width, height;
+};
+typedef struct _GdkRectangle          GdkRectangle;
+#else
 typedef cairo_rectangle_int_t         GdkRectangle;
+#endif
 
 /**
  * GdkAtom: